<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/10/14
  Time: 16:32
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <base href="<%=basePath%>"/>
    <title>Title</title>
<%--    引入EasyUI的资源--%>
    <link rel="stylesheet" type="text/css" href="static/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="static/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="static/themes/demo.css">
    <link rel="stylesheet" type="text/css" href="static/themes/color.css">
    <script type="text/javascript" src="static/jquery.min.js"></script>
    <script type="text/javascript" src="static/jquery.easyui.min.js"></script>
<%--    声明代码域--%>
    <script type="text/javascript">
        $(function () {
            $("#login").click(function () {
                var loginForm = $("#loginForm");
                loginForm.submit();
            })
        })

    </script>
</head>
<body>
<%--创建ting域主持人项目的登录页面--%>
<%--创建面板组件--%>
<div style="width: 402px;margin: auto;margin-top:100px">
    <c:if test="${sessionScope.flag=='loginFail'}">
        <font color="red" size="20px">用户名或密码错误</font>
    </c:if>
    <c:remove var="flag" scope="session"></c:remove>
    <form action="admin/userLogin" id="loginForm" method="post">
        <div class="easyui-panel" style="width:400px;padding:50px 60px" title="欢迎登录Ting域主持人项目后台管理系统">
            <div style="margin-bottom:20px">
                <input id="username" class="easyui-textbox" name="aname" prompt="请输入用户名" iconWidth="28" style="width:100%;height:34px;padding:10px;">
            </div>
            <div style="margin-bottom:20px">
                <input id="pass" class="easyui-passwordbox" name="apwd" prompt="请输入密码" iconWidth="28"
                       style="width:100%;height:34px;padding:10px">
            </div>
            <div style="margin-bottom:20px">
                <a href="javascript:void(0)" id="login" class="easyui-linkbutton c1" style="width:120px">登录</a>
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                <input class="easyui-checkbox" name="fruit" value="Apple" label="记住密码:" labelPositon="after">
            </div>
        </div>
    </form>
    <div id="viewer"></div>
</div>



<script type="text/javascript">
    $('#username').textbox({
        inputEvents: $.extend({}, $.fn.textbox.defaults.inputEvents, {
            keypress: function (e) {
                var char = String.fromCharCode(e.which);
                $('#viewer').html(char).fadeIn(200, function () {
                    $(this).fadeOut();
                });
            }
        })
    })
</script>
<style>
    #viewer {
        position: relative;
        padding: 0 60px;
        top: -70px;
        font-size: 54px;
        line-height: 60px;
    }
</style>
</body>
</html>
